package com.ruyuan.user.server.domain.service;

import com.ruyuan.common.model.PageDTO;
import com.ruyuan.user.server.domain.model.Authority;
import com.ruyuan.user.server.domain.model.Role;
import com.ruyuan.user.server.domain.service.request.*;

import java.util.List;

/**
 * @author xx
 */
public interface RoleDomainService {

    Long saveRole(Role role);

    Role queryById(Long roleId);

    PageDTO<Role> queryRoleByPage(PageQueryRoleParam param);

    PageDTO<Authority> queryRoleAuthorities(PageQueryRoleAuthoritiesParam param);

    void removeRoleAuthorities(ChangeRoleAuthorityParam param);

    void addRoleAuthorities(ChangeRoleAuthorityParam param);

    List<Role> queryUserRole(Long userId);

    List<Role> queryJobRole(Long jobId);

    void addUserRole(ChangeUserRoleParam param);

    void removeUserRole(ChangeUserRoleParam param);

    void addJobRole(ChangeJobRoleParam param);

    void removeJobRole(ChangeJobRoleParam param);

    List<Authority> queryUserAllAuthorities(QueryUserAuthoritiesParam param);

}
